package javazuoye4;

public class zuoye06 {
    public static void main(String[] args) {
        String a="java woaijava,i like java,i enjoy java";
        String b="java";
        System.out.println(delet(a,b));
    }
    public static String delet(String a,String b){
     int c=a.indexOf(b);
     String d="";
   while(c>=0)
   {
       a=a.substring(0,c)+a.substring(c+b.length());
         c=a.indexOf(b,c+b.length());
   }
  return a;
    }
}
